/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jigdo.downloader;

/**
 * Contains members to allow an object to track state changes in ImageDownloads
 * @author John R Sohn
 */
public interface ImageDownloadListener extends DownloadListener {
    
    /**
     * Fires when an ImageDownload Tasks download priority is changed.
     * @param image The event sender
     * @param priority The priority this task has been switched to.
     */
    public void PriorityChange(ImageDownloadTask image, DownloadPriority priority);
    
   /**
    * Fires when any error has been encountered while processing this task.
    * @param image The event sender
    * @param Error The exception that has occurred.
    */
    public void Error(ImageDownloadTask image, Throwable Error);
    
    /**
     * Fires when the task progresses.
     * @param image The event sender
     * @param Step An integer value expressing how far this task has progressed 
     * @param Max An integer value expressing the maximum number of steps
     */
    public void Progress(ImageDownloadTask image, int Step, int Max);
    
    /**
     * Fires when the status of the task changes.
     * @param image The event sender
     * @param status The status the task has been changed to.
     */
    public void StatusChange(ImageDownloadTask image, ImageStatus status);
}
